package com.qijian.maindata.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.common.annotation.KingDeeField;
import com.qijian.common.annotation.KingDeeTable;
import com.qijian.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 汇率对象 fin_exchange_rate
 *
 * @author qijian
 * @date 2022-03-04
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("fin_exchange_rate")
@KingDeeTable(delField = "FCANCELSTATUS")
public class ExchangeRate extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "id")
    @KingDeeField("FRateID")
    private Long id;

    /**
     * 月份
     */
    @Excel(name = "月份", width = 30)
    @ApiModelProperty(value = "月份")
    private String month;

    /**
     * 币别
     */
    @Excel(name = "币别")
    @ApiModelProperty(value = "币别")
    @KingDeeField("FCyForID.FName")
    private String currencyType;

    /**
     * 汇率
     */
    @Excel(name = "汇率")
    @ApiModelProperty(value = "汇率")
    @KingDeeField("FExchangeRate")
    private BigDecimal exchangeRate;

    /**
     * 是否启用
     */
    @Excel(name = "是否启用")
    @ApiModelProperty(value = "是否启用")
    @KingDeeField(value = "FForbidStatus", convert = "A=true,B=false")
    private Boolean isEnabled;

    @TableField(exist = false)
    @KingDeeField("FEndDate")
    private Date endDate;
}
